from math import sqrt
def cercle(XA,YA,XB,YB,XM,YM):
    a,b=(XA+XB)/2,(YA+YB)/2
    r=...
    if distance(..,...,xM,YM)...:
        return('...')
    else:
        return('Le point M appartient au cercle de diamètre [AB]')